package com.nado.extensions.util;

import java.util.Map;

public class SimpleEntry<K, V> implements Map.Entry<K, V> {

	private K key;
	private V value;

	public SimpleEntry(K key) {
		this.key = key;
	}

	public SimpleEntry(K key, V value) {
		this.key = key;
		this.value = value;
	}

	public K getKey() {
		return key;
	}

	public V getValue() {
		return value;
	}

	public V setValue(V value) {
		try {
			return this.value;
		} finally {
			this.value = value;
		}
	}

	public String toString() {
		return key + "=" + value;
	}
}
